package edu.csl.study.springboot.mongo.vo;

import lombok.Data;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

@Document("t_user")
@Data
public class UserDemo extends MongoBase {

	/*** TODO  @CompoundIndex 复合索引
	 *   TODO  唯一索引的话是@Indexed(unique = true)
	 *  */
	@Indexed
	private String userCode;
	private String userName;
	@Field("t_password")
	private String password;
	private int age;
}
